#ifndef _FLASH_EEPROM_H_
#define _FLASH_EEPROM_H_


//#define BOOTLOADER_ADDRESS		(uint32_t)0x08000000
#define APPLICATION_ADDRESS     (uint32_t)0x08004000



#define FLASH_USER_START_ADDR		(uint32_t)0x0800F000
#define FLASH_USER_END_ADDR			(uint32_t)0x0800F800



#define APP_DECODE_START_ADDR		(uint32_t)0x0800F800
#define	APP_DECODE_ADDR				(uint32_t)0x0800F8C0
#define APP_DECODE_END_ADDR			(uint32_t)0x08010000


#define EEPROM_MAX_INDEX		32








typedef union
{
    uint32_t ID_WORD[3];
    uint8_t ID_Byte[12];
} psswd_TypeDef;

int8_t FLASH_EEPROM_Write(uint8_t addr, uint32_t data);
int64_t FLASH_EEPROM_Read(uint8_t addr);
void App_Decode(void);
void Get_UID(void);
uint8_t get_1(void);
uint8_t get_0(void);
uint8_t check(void);;
void Flash_Write_Data(void);
void Flash_Read_Data(void);
#endif
